﻿using System.Collections.Generic;

namespace com.binance.client.model.enums
{
	 

	/// <summary>
	/// SPOT, MARGIN, OTC, POINT, UNKNOWN.
	/// </summary>
	public sealed class AccountType
	{
	  public static readonly AccountType SPOT = new AccountType("SPOT", InnerEnum.SPOT, "spot");
	  public static readonly AccountType MARGIN = new AccountType("MARGIN", InnerEnum.MARGIN, "margin");
	  public static readonly AccountType OTC = new AccountType("OTC", InnerEnum.OTC, "otc");
	  public static readonly AccountType POINT = new AccountType("POINT", InnerEnum.POINT, "point");
	  public static readonly AccountType SUPER_MARGIN = new AccountType("SUPER_MARGIN", InnerEnum.SUPER_MARGIN, "super-margin");
	  public static readonly AccountType MINEPOOL = new AccountType("MINEPOOL", InnerEnum.MINEPOOL, "minepool");
	  public static readonly AccountType ETF = new AccountType("ETF", InnerEnum.ETF, "etf");
	  public static readonly AccountType AGENCY = new AccountType("AGENCY", InnerEnum.AGENCY, "agency");
	  public static readonly AccountType UNKNOWN = new AccountType("UNKNOWN", InnerEnum.UNKNOWN, "unknown");

	  private static readonly IList<AccountType> valueList = new List<AccountType>();

	  static AccountType()
	  {
		  valueList.Add(SPOT);
		  valueList.Add(MARGIN);
		  valueList.Add(OTC);
		  valueList.Add(POINT);
		  valueList.Add(SUPER_MARGIN);
		  valueList.Add(MINEPOOL);
		  valueList.Add(ETF);
		  valueList.Add(AGENCY);
		  valueList.Add(UNKNOWN);
	  }

	  public enum InnerEnum
	  {
		  SPOT,
		  MARGIN,
		  OTC,
		  POINT,
		  SUPER_MARGIN,
		  MINEPOOL,
		  ETF,
		  AGENCY,
		  UNKNOWN
	  }

	  public readonly InnerEnum innerEnumValue;
	  private readonly string nameValue;
	  private readonly int ordinalValue;
	  private static int nextOrdinal = 0;

	  private readonly string code;

	  internal AccountType(string name, InnerEnum innerEnum, string code)
	  {
		this.code = code;

		  nameValue = name;
		  ordinalValue = nextOrdinal++;
		  innerEnumValue = innerEnum;
	  }

	  public override string ToString()
	  {
		return code;
	  }

//JAVA TO C# CONVERTER NOTE: Fields cannot have the same name as methods:EnumLookup


		public static IList<AccountType> values()
		{
			return valueList;
		}

		public int ordinal()
		{
			return ordinalValue;
		}

		public static AccountType valueOf(string name)
		{
			foreach (AccountType enumInstance in AccountType.valueList)
			{
				if (enumInstance.nameValue == name)
				{
					return enumInstance;
				}
			}
			throw new System.ArgumentException(name);
		}
	}

}